package org.example.aop.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Order(10)
//@Component
@Slf4j
@Aspect
public class AspectDemo3 {
    @Pointcut("execution(* org.example.aop.controller..*(..))")
    public  void pt() {}
    @Before("org.example.aop.aspect.AspectDemo.pt()")
    public void doBefore(){
        log.info("AspectDemo3 do before..");
    }
    @After("org.example.aop.aspect.AspectDemo.pt()")
    public void doAfter(){
        log.info("AspectDemo3 do after..");
    }
}
